<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Register</title>
    <link rel="shortcut icon" href="{% static 'images/register.png' %}" type="image/x-icon">
    <link href="{% static 'css/user-style.css' %}" rel="stylesheet">
    <link href="{% static 'css/font-family.css' %}" rel="stylesheet">
    <link href="{% static 'css/checkbox.css' %}" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
</head>
<body>
    <section class="register-section">
        <div class="color"></div><div class="color"></div><div class="color"></div>
        <div class="box">
            <div class="circle" style="--x:0"></div><div class="circle" style="--x:1"></div><div class="circle" style="--x:2"></div><div class="circle" style="--x:3"></div><div class="circle" style="--x:4"></div>
            <div class="container">
                <div class="form">
                    <div class="title-div"><h2>Register</h2></div>
                    <form id="user-form" ajax="/register/">
                        {% csrf_token %}
                        <div class="input-box">{{ form.username }}</div>
                        <div class="input-box">{{ form.password }}</div>
                        <div class="input-box">{{ form.re_password }}</div>
                        <div class="input-box captcha-form">{{ form.captcha }}</div><br>
                        <div class="valid-error" id="error-frame">
                            <i class="fa-solid fa-circle-exclamation"></i>
                            <span id="error"></span>
                        </div>
                        <div id="checklist"></div>
                        <div class="input-box"><div id="submit-box" class="nunito">register</div></div>
                    </form>
                    <p class="forget">Already have an account?<a href="/login/">Login</a></p>
                </div>
            </div>
        </div>
    </section>
    <script src="https://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
    <script src="{% static 'js/checkbox.js' %}"></script>
    <script>
        $(document).ready(function() {
            $validate([
                usernameValidator(),
                passwordValidator(),
                repasswordValidator(),
                hCaptchaValidator(),
            ]);
        });
    </script>
</body>
</html>
